package com.wwg.threads.binghe.concurrent.executor.state;

import java.awt.*;
import java.util.concurrent.TimeUnit;

/**
 * @Description: 线程不断休眠
 * @Author: wwg
 * @Date: 2021/5/28
 */
public class WaitingTime implements Runnable{
    @Override
    public void run() {
        while (true){
            waitSecond(200);
        }
    }

    public static final void waitSecond(long second) {
        try {
            TimeUnit.SECONDS.sleep(second);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
